'''
Created on Jul 21, 2009

@author: user
'''

class edgeProbModel(object):
    '''
    classdocs
    '''


    def __init__(self, p):
        '''
        Constructor
        '''
        self.p = p
    

    def pr(self, node, neighbors, all_possible_neighbors):
        ''' Probability of nodes '''
        return pow(1-self.p,len(all_possible_neighbors)-len(neighbors))*\
                pow(self.p,len(neighbors))   
       